package pojo;

/**
 * ModelDetailId entity. @author MyEclipse Persistence Tools
 */

public class ModelDetailId implements java.io.Serializable {

	// Fields

	private Difficultymodel difficultymodel;
	private Difficulty difficulty;

	// Constructors

	/** default constructor */
	public ModelDetailId() {
	}

	/** full constructor */
	public ModelDetailId(Difficultymodel difficultymodel, Difficulty difficulty) {
		this.difficultymodel = difficultymodel;
		this.difficulty = difficulty;
	}

	// Property accessors

	public Difficultymodel getDifficultymodel() {
		return this.difficultymodel;
	}

	public void setDifficultymodel(Difficultymodel difficultymodel) {
		this.difficultymodel = difficultymodel;
	}

	public Difficulty getDifficulty() {
		return this.difficulty;
	}

	public void setDifficulty(Difficulty difficulty) {
		this.difficulty = difficulty;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ModelDetailId))
			return false;
		ModelDetailId castOther = (ModelDetailId) other;

		return ((this.getDifficultymodel() == castOther.getDifficultymodel()) || (this
				.getDifficultymodel() != null
				&& castOther.getDifficultymodel() != null && this
				.getDifficultymodel().equals(castOther.getDifficultymodel())))
				&& ((this.getDifficulty() == castOther.getDifficulty()) || (this
						.getDifficulty() != null
						&& castOther.getDifficulty() != null && this
						.getDifficulty().equals(castOther.getDifficulty())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getDifficultymodel() == null ? 0 : this.getDifficultymodel()
						.hashCode());
		result = 37
				* result
				+ (getDifficulty() == null ? 0 : this.getDifficulty()
						.hashCode());
		return result;
	}

}